package org.komarichin.feed;

import com.sun.syndication.io.FeedException;

import java.io.Serializable;
import java.util.List;

/**
 * User: Mykhaylo Komarichyn
 * Date: 02.03.2010
 * Time: 19:19:28
 */
public interface IFeedWriter extends Serializable {
    static final String FEED_TYPE_RSS = "rss";
    static final String FEED_TYPE_ATOM = "atom";

    /**
     * build feeds
     *
     * @param title       feed title
     * @param link        feed link
     * @param description description feed
     * @param feedType    feed type, can be (rss_0.90, rss_0.91, rss_0.92, rss_0.93, rss_0.94, rss_1.0 rss_2.0 or atom_0.3)
     * @param entries     list of entries for publishing
     * @return formated string for publishing feeds
     * @throws FeedException e
     */
    String getFeeds(String title, String link, String description, String feedType, List<IEntryFeed> entries) throws FeedException;
}
